import { createStore, createLogger } from 'vuex'
import state from './state'
import mutations from './mutations'
import * as getters from './getters'
import * as actions from './action'
const debug = process.env.NODE_ENV !== 'production'
export default createStore({
  state,
  mutations,
  actions,
  getters,
  // 开发模式下开启严格模式
  strict: debug,
  // 日志打印插件
  plugins: debug ? [createLogger()] : []
})
